$(document).ready(function () {
    if(document.activeElement.nodeName == 'INPUT'){
        $("body").height($("body")[0].clientHeight);
    } else {
        $("body").css('position', 'fixed');
    }
});
/*收信和写信图片3D转换*/
function turnleft() {
    $(".in_content").addClass("back_-90");
    $(".out_content").addClass("back_90");
    $(".wirter").css("top","0");
    $(".have").css("top","-49px");
    $(".input__field--1016::before").css("border-top","4px solid #FAD9B4");
    if($(window).width() >=376&&$(window).width()<=768)
    {$(".bottom").animate({left:'210px'},"fast");}
    if($(window).width() <376&& $(window).width() >360)
    {
        $(".bottom").animate({left:'191px'},"fast");
    }
    if($(window).width() <=360 && $(window).width() >=321)
    {
        $(".bottom").animate({left:'184px'},"fast");
    }
    if($(window).width() <321)
    {
        $(".bottom").animate({left: '162px'},"fast");
    }
}
function turnright() {
    $(".in_content").removeClass("back_-90");
    $(".out_content").removeClass("back_90");
    $(".wirter").css("top","-50px");
    $(".have").css("top","0");
    $(".input__field--1016::before").css("border-top","4px solid #C9EFF2");
    if($(window).width() >=376&&$(window).width()<=768)
    {  $(".bottom").animate({left:'108px'},"fast");}
    if($(window).width() <376&& $(window).width() >360)
    {
        $(".bottom").animate({left:'88px'},"fast");
    }
    if($(window).width() <=360 && $(window).width() >=321)
    {
        if($(window).width() ==360)
        {
            $(".bottom").animate({left:'82px'},"fast");
        }
        else{
            $(".bottom").animate({left:'88px'},"fast");}
    }
    if($(window).width() <321)
    {
        $(".bottom").animate({left: '61px'},"fast");
    }
    document.getElementById("input-20").value='';
    $("#output_text").html('');
}
/*验证码检验*/
function get_ture() {
    var text = /*$("#input").val();*/document.getElementById("input").value;
    console.log(text);
    var _url = /^[a-zA-Z0-9\u4e00-\u9fa5]+$/;
    var _text_ = document.getElementById("inputText").value;
    console.log(_text_);
    var text_lenght = document.getElementById("inputText").value.length;
    console.log(text_lenght);
    var result = _url.test(text);
    if (text.length != 0 && result && text_lenght !='') {
        return 1;
    }
    if (text.length != 0 && !result && text_lenght == '') {
        return 2;
    }
    if (text.length != 0 && result && text_lenght == '') {
        return 3;
    }
    if (text.length != 0 && !result && text_lenght != '') {
        return 4;
    }
    if (text.length == 0 && text_lenght != '') {
        return 5;
    }
    if (text.length == 0 && text_lenght == '') {
        return 6;
    }
}

$('input').click(function(){
    $('.game_using').css("display","none");
})
$('#inputText').click(function(){
    $('.game_using').css("display","none");
})

$('img').click(function(){
    $('.game_using').css("display","block");
    console.log("点击了图片");
})



    


